<template>
  <div id="container">
    <div id="viewDiv"></div>
    <el-main style="position:absolute;top:20px;left:20px;width:500px;height:auto;
    background-color:white;border-radius:5px;box-shadow:0 0 2px gray" oncontextmenu="return false">
    <el-space direction="vertical" :size="20" alignment="start">
      <el-text type="large">制作不易,联系作者小偿获取完整版源码和word文档</el-text>
      <el-text type="large">扫码添加作者微信,可定制DEMO,提供技术咨询服务</el-text>
      <el-text type="large">需要Arcgis_Server开发者账号的联系作者合租服务器(支持上传各种2D/3D图层)</el-text>
      <el-button type="primary" @click="button_click" plain>点击这里预览VUE3基础教程(基于arcgis_api)源码DEMO合集</el-button>
    </el-space>
    <div style="position:absolute;right:20px;top:23px;z-index:10000">
      <img src="../../assets/images/二维码.png" style="width:80px;height:80px;" draggable="false" oncontextmenu="return false"/>
    </div>
    </el-main>
 </div>
</template>

<script setup>
import {onMounted} from 'vue'
import Map from '@arcgis/core/Map'
import MapView from '@arcgis/core/views/MapView'
import * as 天地图 from '../天地图'
var map,view
const button_click=()=>{
  window.location.href='https://ws8575.club/vue3'
}
onMounted(()=>{
  map=new Map({
    basemap:{
      baseLayers:天地图.天地图矢量
    }
  })
  view=new MapView({
    center:[119,36],
    zoom:10,
    map:map,
    container:"viewDiv"
  })
  view.ui.remove(["zoom","attribution"])
})//onMounted结尾

</script>

<style scoped>
#viewDiv,#container{
height:100%;width:100%;padding:0;margin:0;
}
span{
white-space: pre-line;
}
</style>
